public class myWeb2LeadExtension {
   
      private final Lead weblead;
   
      public myWeb2LeadExtension(ApexPages.StandardController
                                  stdController) {
         weblead = (Lead)stdController.getRecord();
      }
       String p;
       public PageReference saveLead() {
         try {
                  insert(weblead);
                  p = [Select Unique_Id__c from Lead where id =:weblead.id limit 1].Unique_Id__c;
         }
         catch(System.DMLException e) {
             ApexPages.addMessages(e);
                          return null;
         }
         
                  //PageReference p = Page.ThankYou;
                  //PageReference p = new PageReference('http://sakgf.okgp.cs11.force.com/page?nocache=0.988&pageid=a0aZ00000003CfXIAU');
                  PageReference pg = new PageReference('http://sakgf.okgp.cs11.force.com/SAKGF_Landing_Page_Template?p='+p);
         pg.setRedirect(true);
         return pg;
       }
  }